package com.zzl.finance.data.dto;

import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author sunpp
 * @date 2021-11-29 13:17:46
 */
@Data
@ApidocModel
@SuppressWarnings("javadoc")
public class AddressBookAddDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "用户名称 不能为空")
    @ApidocModelProperty(description = "用户名称", example = "测试人")
    private String userName;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^(((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19[89]))\\d{8})$", message = "手机号格式错误")
    @ApidocModelProperty(description = "手机号", example = "17302687989")
    private String userPhone;

    @NotEmpty(message = "邮箱 不能为空")
    @ApidocModelProperty(description = "邮箱", example = "111@qq.com")
    private String userEmail;

    @ApidocModelProperty(description = "备注", example = "111@qq.com")
    private String remark;


    @NotEmpty(message = "所属公司 不能为空")
    @ApidocModelProperty(description = "所属公司", example = "测试公司")
    private String userEnterprise;


}
